/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.gov.cemaden.library.model;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Size;

/**
 *
 * @author alan
 */
@Entity
@Table(name = "ger_municipio")
@SequenceGenerator(name = "sequence", sequenceName = "ger_municipio_sequence")
public class Municipio implements Serializable, BaseEntity{
    
    @Id
    @GeneratedValue(generator = "sequence", strategy = GenerationType.AUTO)
    @Column(name = "id_municipio", nullable = false, unique = true)
    private Long idMunicipio;
        
    @Column(name = "cidade")
    @Size(max = 255)
    private String cidade;
    
    @Column(name = "codibge")
    private Integer codIBGE;
    
    @Column(name = "uf")
    @Size(max = 2)
    private String uf;
    
    public Municipio(){
        
    }

    public Long getId() {
        return this.getIdMunicipio();
    }
    
    /**
     * @return the idMunicipio
     */
    public Long getIdMunicipio() {
        return idMunicipio;
    }

    /**
     * @param idMunicipio the idMunicipio to set
     */
    public void setIdMunicipio(Long idMunicipio) {
        this.idMunicipio = idMunicipio;
    }

    /**
     * @return the cidMunicipioade
     */
    public String getCidade() {
        return cidade;
    }

    /**
     * @param cidade the cidMunicipioade to set
     */
    public void setCidade(String cidade) {
        this.cidade = cidade;
    }

    /**
     * @return the codIBGE
     */
    public Integer getCodIBGE() {
        return codIBGE;
    }

    /**
     * @param codIBGE the codIBGE to set
     */
    public void setCodIBGE(Integer codIBGE) {
        this.codIBGE = codIBGE;
    }

    /**
     * @return the uf
     */
    public String getUf() {
        return uf;
    }

    /**
     * @param uf the uf to set
     */
    public void setUf(String uf) {
        this.uf = uf;
    }
                
}
